package com.authine.cloudpivot.ext.enums.goods;

import java.util.Arrays;

/**
 * @Author: zhoujian
 * @Date: 2019/7/5 22:58
 * @Version 1.0
 */
public enum MallFeaturedEnum {

    NORMAL("普通商品"),
    FEATURED("精选商品");

    public String desc;

    MallFeaturedEnum(String desc) {
        this.desc = desc;
    }

    public static MallFeaturedEnum get(Integer ordinal) {
        return Arrays.stream(MallFeaturedEnum.values()).filter(v -> v.ordinal() == ordinal).findFirst().orElse(null);
    }

    @Override
    public String toString() {
        return desc;
    }
}
